package com.yin.controller;

import com.yin.common.util.R;
import com.yin.service.IRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 宿舍 前端控制器
 * </p>
 *
 * @author yp
 * @since 2025-01-14
 */
@RestController
@RequestMapping("/room")
public class RoomController {
    @Autowired
    private IRoomService roomService;
    
    @GetMapping("/list")
    public R list() {
        return R.ok().data("list", roomService.list());
    }
}
